package cn.javabb.core.mapper.biz;


import cn.javabb.core.base.BaseMapper;
import cn.javabb.core.entity.biz.CommentDO;
import cn.javabb.core.query.CommentQuery;
import cn.javabb.core.vo.CommentArticleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author QINB imqinbao@163.com
 * @CreateDate 2019/1/3/003 10:55
 * @Since V1.0
 */
public interface CommentMapper extends BaseMapper<CommentDO> {
    /*帖子评论列表*/
    List<CommentDO> listCommentsByPostId(@Param(value = "postId")Integer postId);
    /*帖子最后一条评论*/
    CommentDO queryLastCommentByPostId(@Param(value = "postId")Integer postId);
    /*用户帖子评论列表*/
    List<CommentArticleVO> listPostComments(CommentQuery query);
    /*用户帖子评论列表*/
    List<CommentArticleVO> listBlogComments(CommentQuery query);
    /*博客评论列表*/
    List<CommentDO> listCommentsByBlogId(@Param(value = "blogId")Integer blogId);
}
